'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    return queryInterface.sequelize.transaction(async t => {
      await queryInterface.bulkInsert("sys_role_dept", [
        {
          role_id: 2,
          dept_id: 100
        }, {
          role_id: 2,
          dept_id: 101
        }, {
          role_id: 2,
          dept_id: 105
        }
      ], { transaction: t });
    })
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    return queryInterface.sequelize.transaction(async t => {
      return await queryInterface.bulkDelete("sys_role_dept", null, { transaction: t });
    })
  }
};
